//
//  WeCloudIMClient+Message.h
//  WeCloudChatDemo
//
//  Created by 与梦信息的Mac on 2022/4/13.
//  Copyright © 2022 WeCloud. All rights reserved.
//

#import "WeCloudIMClient.h"

NS_ASSUME_NONNULL_BEGIN

@interface WeCloudIMClient (Message)

#pragma mark - 发送消息
- (void)sendData:(id)data
          action:(NSString *)sendChatType
           reqId:(NSString *)reqId
  conversationId:(NSString *)conversationId;

/// 发送位置消息
/// @param sendChatType 发送类型
/// @param conversationId 会话id
/// @param content 消息内容
/// @param attrs 用来给开发者存储拓展的自定义属性字段
/// @param pushContent 客户端自定义系统推送内容
- (void)sendLocationMessage:(NSString *)sendChatType
                      reqId:(NSString *)reqId
             conversationId:(NSString *)conversationId
                    content:(NSDictionary *)content
                      attrs:(NSDictionary * __nullable)attrs
                pushContent:(NSDictionary * __nullable)pushContent;

/// 自定义类型消息
/// @param sendChatType 发送类型
/// @param conversationId 会话id
/// @param msgType 自定义消息类型
/// @param customContent 自定义消息体
/// @param pushContent 客户端自定义系统推送内容
- (void)sendCustomMessage:(NSString *)sendChatType
                    reqId:(NSString *)reqId
           conversationId:(NSString *)conversationId
              messageType:(NSInteger)msgType
            customContent:(NSDictionary *)customContent
                       pushContent:(NSDictionary * __nullable)pushContent;

/// 发送文本消息
/// @param message 消息体
/// @param sendChatType 发送聊天类型
/// @param pushContent  客户端自定义系统推送内容
/// @param attrs 用来给开发者存储拓展的自定义属性字段
- (void)sendMessage:(WeCloudMessageModel *)message
             action:(NSString *)sendChatType
        pushContent:(NSDictionary *__nullable)pushContent
              attrs:(NSDictionary *__nullable)attrs;

/// 发送文件消息
/// @param message 消息体
/// @param sendChatType 发送聊天类型
/// @param pushContent  客户端自定义系统推送内容
/// @param attrs 用来给开发者存储拓展的自定义属性字段
- (void)sendFileMessage:(WeCloudMessageModel *)message
                 action:(NSString *)sendChatType
            pushContent:(NSDictionary *__nullable)pushContent
                  attrs:(NSDictionary *__nullable)attrs;

#pragma mark - 消息处理相关接口
/// 删除消息内容
/// @param msgIds 消息id列表
/// @param completionBlock 回调
- (void)wcim_deleteMessage:(nonnull NSArray *)msgIds
           completionBlock:(nullable WCIMRequestCompletionBlock)completionBlock;



/// 消息撤回
/// @param msgId 消息id
/// @param pushData 自定义推送字段(包含title,subTitle,data{})
/// @param completionBlock 回调
- (void)wcim_withdrawMessage:(nonnull NSString *)msgId
                   pushData:(nullable NSDictionary *)pushData
             completionBlock:(nullable WCIMRequestCompletionBlock)completionBlock;

#pragma mark - 待测试
/// 消息修改为已读状态
/// @param msgIds 消息id
/// @param completionBlock 回调
- (void)wcim_readerMessage:(NSArray *)msgIds
           completionBlock:(nullable WCIMRequestCompletionBlock)completionBlock;

#pragma mark - 待测试
/// 消息修改为已接收状态
/// @param msgIds 消息id
/// @param readStatus 是否同时修改为已读状态
/// @param completionBlock 回调
- (void)wcim_receiveMessage:(NSArray *)msgIds
                 readStatus:(BOOL)readStatus
             completionBlock:(nullable WCIMRequestCompletionBlock)completionBlock;

#pragma 在线收到发送消息回执
- (void)receiveOnlineSendMessageCallBack:(id)response reqId:(NSString *)reqId;

@end

NS_ASSUME_NONNULL_END
